<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ page import="java.util.*,com.carsite.webapp.help.ModuleMenuHelp"%>



   <script language="javascript">
	     
		  function onCheckedSelect(){
			   if(typeof(document.all.ids) != "undefined")
			   {
			   }
				else
			   {
				alert("没有可选择记录��¼.");
				return;
			   }
				
				selectedflag = false;
			     
				 if (document.all.ids.checked)
				 {
					 selectedflag=true;
				 }
				 
				
				 for (var i=0;i<document.all.ids.length;i++)
				 {
					  if (document.all.ids(i).checked)
					  {
						  selectedflag=true;
						  break;
					  }
				 }
				 
				 if(selectedflag !=true)   
				 {
					  alert("至少选择一条记录.");
					  selectedflag == false;
					  return false;
				  }
	     }


		   
       </script>
       
       
<table width="100%" height="76" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="left" valign="top" >
	  
      
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
			  <tr>
				<td height="25" bgcolor="#5F9CD4" class="font01">&nbsp;&nbsp;&nbsp;&nbsp;系统&gt;&gt;角色权限&gt;&gt;权限设置</td>
			  </tr>
			  <tr>
				<td height="8"></td>
			  </tr>
			</table>
		  
         
           <html:form action="roles?method=rolePrivilegeSave" method="post" styleId="roleForm" >
               <html:hidden property="id"/>
             
			  <!--- BEGIN--->
			  <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CDCDCD">
				<tr>
				  <td height="27" background="img/m-bt-bg01.gif" bgcolor="#FFFFFF" style="background-repeat:no-repeat;background-position:right">
						<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
							  <td width="2%"><img src="img/dian-1.gif" width="6" height="6" /></td>
							  <td width="48%" class="btn02">权限设置</td>
							  <td width="50%">&nbsp;</td>
							</tr>
				    </table>
				  </td>
				</tr>
				<tr>
				  <td bgcolor="#F8F8F8">
					    <table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolor="ffffff" bordercolordark="#ffffff" bordercolorlight="B9B9B9">
							<tr align="center">
							  <td width="133" height="27" bgcolor="#EFEFEF">&nbsp;</td>
							  <td width="310">
							       <link type="text/css" rel="stylesheet" href="tree/xtree.css">
								   <script src="tree/xtree.js"></script>
								   <script language="javascript">
								      function onSelMenu(id,type){
										if(type==0){
										     window.parent('contentPage').location.href="editModuleMenu.html?menuId="+id;
										     
										 }else if(type=1){
										     window.parent('contentPage').location.href="moduleMenus.html?method=moduleEdit&from=menu&menuId="+id;
										 }
										 
									  }     
							       </script>
								   <script>
									 <%
									 
									      List menuList = (List)request.getAttribute("moduleMenuList");
	                                     Map selectedMenuMap = (Map)request.getAttribute("selectedMemuMap");
	                                   
									     String tree = ModuleMenuHelp.dumpPrivilegeMenuScript(menuList,selectedMenuMap,false);
									     out.println(tree);
									 
									%>
	                                  document.write(menuTree );
	 	 
								  </script> 
							  
							  </td>
							  <td width="156"bgcolor="#EFEFEF">&nbsp; </td>
						    </tr>
					</table>			  
						<table  width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="ffffff" bordercolorlight="B9B9B9" bordercolordark="#ffffff">
						  <tr bgcolor="#99CCCC" >
							<td width="25%" height="28" align="center"  bgcolor="#EFEFEF">&nbsp; </td>
							<td width="34%" height="28" align="center" nowrap  bgcolor="#EFEFEF">
							 
						        <html:submit  property="method.save" onclick="onCheckedSelect();bCancel=false">
						            <fmt:message key="button.save"/>
						        </html:submit>
						
						   
						
						        <html:cancel onclick="bCancel=true">
						            <fmt:message key="button.cancel"/>
						        </html:cancel>
        
							 </td> 
							<td width="41%" height="28"   bgcolor="#EFEFEF" >&nbsp;</td>
						  </tr>
					</table>
				  
				  </td>
				</tr>
			  </table>
			  
			 <!---END--->
	  
	  
              </html:form>
			
      
    
	</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>
